home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / tsbat36.zip / LASTBOOT.BAT < prev    next >
DOS Batch File  |  1990-10-21  |  955b  |  34 lines

  1. echo off
  2. echo.
  3. echo ┌───────────────────────────────────────────────────┐
  4. echo │ Date and time of the previous boot                │
  5. echo │ By Prof. Timo Salmi, ts@chyde.uwasa.fi, 21-Oct-90 │
  6. echo └───────────────────────────────────────────────────┘
  7.  
  8. if "%1"=="" goto _help
  9.  
  10. rem Record time and date of the current boot
  11. echo.|date >  newboot.$$$
  12. echo.|time >> newboot.$$$
  13.  
  14. rem Display the last boot and replace
  15. if exist oldboot.$$$ find "Current" oldboot.$$$
  16. if not exist oldboot.$$$ echo Boot date and time recorded
  17. if exist oldboot.$$$ echo Where "Current" refers to the previous boot
  18. copy newboot.$$$ oldboot.$$$ > nul
  19. del newboot.$$$ > nul
  20. goto _out
  21.  
  22. :_help
  23. echo.
  24. echo To get the information when your system was last booted put the
  25. echo following line in your autoexec.bat:
  26. echo.
  27. echo call LASTBOOT YourInitialsOrWhatever
  28. echo   or
  29. echo %comspec% /e:1024 /c LASTBOOT YourInitialsOrWhatever
  30. goto _out
  31.  
  32. :_out
  33. echo on
  34.